package com.minelx.sequence.pattern;

import com.minelx.sequence.pattern.config.IReducer;
import com.minelx.sequence.pattern.variable.IVariableManager;
import com.minelx.sequence.pattern.variable.ReducedVariableManager;
import com.minelx.sequence.pattern.variable.VariableManager;

import java.util.Map;

public interface IVariableManagerFactory {
	IVariableManager createVariableManager();

	static IVariableManagerFactory simple() {
		return VariableManager::new;
	}

	static IVariableManagerFactory reducing(Map<String, IReducer<?>> reducers) {
		return () -> new ReducedVariableManager(reducers);
	}
}
